package com.schoolcafeteria.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.schoolcafeteria.biz.UserBiz;
import com.schoolcafeteria.dao.UserDao;
import com.schoolcafeteria.entity.Role;
import com.schoolcafeteria.entity.User;

@Service("userBiz")
public class UserBizImpl implements UserBiz{
    @Autowired
    private UserDao uDao;
	
	public User fetchByUsername(String username) {
		// TODO Auto-generated method stub
		return uDao.fetchByUsername(username);
	}

	public List<Role> getRolesByUserId(int userId) {
		// TODO Auto-generated method stub
		return uDao.getRolesByUserId(userId);
	}

}
